package ac.il.technion.cs236369.hw5.core.entities;

import java.io.Serializable;
import java.lang.Integer;
import java.lang.String;
import java.util.ArrayList;
import java.util.Collection;

import javax.persistence.*;

/**
 * Entity implementation class for Entity: Role
 *
 */
@Entity
@Table( name="roles")
public class Role implements Serializable {

	   
	@Id
	@Column(name="role")
	private String role;
	private Integer level;
	@OneToMany
	@JoinColumn(name="role_id")
	private Collection<User> users = new ArrayList<User>( );
	private static final long serialVersionUID = 1L;
	
	public Collection<User> getUsers() {
		return users;
	}

	public void setUsers(Collection<User> users) {
		this.users = users;
	}


	public Role() {
		super();
	}   
	
	public String getRole() {
		return this.role;
	}

	public void setRole(String role) {
		this.role = role;
	}   
	public Integer getLevel() {
		return this.level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}
   
}
